package edu.taru.dao;

import java.util.HashMap;
import java.util.List;

import edu.taru.pojo.User;
import util.SqlHelper;

public class EchoDaoImpl {
	public User echo(String id) {
		String sql="select * from user where id=?";
		List<HashMap<String,Object>> list = SqlHelper.select1(sql,id);
		User user = new User();
		user.setUsername(list.get(0).get("username")==null?null:list.get(0).get("username").toString());
		user.setName(list.get(0).get("name")==null?null:list.get(0).get("name").toString());
		user.setEmail(list.get(0).get("email")==null?null:list.get(0).get("email").toString());
		user.setTelphone(list.get(0).get("telphone")==null?null:list.get(0).get("telphone").toString());
		
		return user;
	}

}
